<!--
// JavaScript Document
function playswf(sFile,sWidth,sHeight){
 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ sWidth +'" height="'+ sHeight +'">  ');
 document.write(' <param name="movie" value="'+ sFile +'">  ');
 document.write(' <param name="quality" value="high">  ');
 document.write(' <param name="wmode" value="transparent">  ');
 document.write(' <embed src="'+ sFile +'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ sWidth +'" height="'+ sHeight +'"></embed>  ');
 document.write('</object> ');
}


function clearTxt (id) {
	
	var e = null;
	
	e = document.getElementById(id);
	if (e == null) {
		e = document.getElementsByName(id);
		
		if (e != null && e.length >= 1) {
			e = e[0];
		}
	}
	
	if (e != null) {
	
		if (e.value == "关键字搜索" ||
			e.value == "请填写手机号码办理自助业务" ||
			e.value == "请输入您的手机号码" ||
			e.value == "请输入手机号" ||
			e.value == "请输入验证码" ||
			e.value == "请输入关键字" ||
			e.value == "Please input phone number" ||
			e.value == "温馨提示：为了方便您提交，建议使用其他文本编辑器编辑文字，再用拷贝粘贴的方式录入。（征文稿件请自行备份）"
		) {
			e.value = "";
		}
	}
		
	return;
}


function jumpMenu(targ,selObj,restore) {
	var val = selObj.options[selObj.selectedIndex].value;

	if (val != null && val.length > 0) {
		dcsMultiTrack('DCS.dcsuri',"/nopv.gif","WT.jumpMenu",val);
		window.open(val);
	}
		
	if (restore) selObj.selectedIndex = 0;
}


// 判断用户输入的手机号码是否正确，并给出提示。
function checkMBPhone(phone) {
	var rv = false;
	
	var ispn = 0;
	
	ispn = isPhoneNumber(phone);

	if (ispn == 0) {
		rv = true;
	}
	else if (ispn == 1) {
		window.alert("请输入11位数字组成的手机号码!");
		rv = false;
	}
	else if (ispn == 2) {
		window.alert("请正确输入中国移动手机号码!");
		rv = false;
	}
     
	return rv;
}

// 判断字符串是否是手机号码
// 0是手机号码 1不是11位数字 2号码前缀不正确
/* 用于检验手机号的位数以及检验此手机中是否为中国移动的手机号*/
/* 由于存在携号转网的情况 允许3个运营商的全部号段（试点中）*/
// 中国移动号码段：134(0至8号段) 135 136 137 138 139 147 150 151 152 157 158 159 178 182 183 184 187 188
// 中国联通号码段：130 131 132 145 155 156 176 185 186
// 中国电信号码段：133 153 177 180 181 189
// 虚拟运营商号码段：170
function isPhoneNumber(phone) {
	var rv = 0;

	var mbphnoM = /^(13[4-9])|^(147)|^(150)|^(151)|^(152)|^(157)|^(158)|^(159)|^(178)|^(182)|^(183)|^(184)|^(187)|^(188)/;
	var mbphnoU = /^(130)|^(131)|^(132)|^(145)|^(155)|^(156)|^(176)|^(185)|^(186)/;
	var mbphnoT = /^(133)|^(153)|^(177)|^(180)|^(181)|^(189)/;
	var mbphnoV =/^(170)/;
      
	var num11 = /^\d{11}$/; //11位数字;
      
	if (null != phone && "" != phone && num11.exec(phone)) {
		
		if (mbphnoM.exec(phone) || mbphnoU.exec(phone) || mbphnoT.exec(phone) || mbphnoV.exec(phone)) {
			rv = 0;
		}
		else {
			rv = 2;
		}
	}
	else {
		rv = 1;
	}
     
	return rv;
}

// 判断输入的参数是否为4位数字组成的验证码 返回或false
function isImgVal(val) {
	var rv = false;

	var num4 = /\d{4}/; // 4位数字
      
	if (null != val && "" != val && num4.exec(val)) {
		rv = true;
	}
	else {
		rv = false;
	}
     
	return rv;
}



// Create a cookie with the specified name and value.
function setCookie(sName, sValue) {
	
	// Expires the cookie in one month
	var date = new Date();
	date.setMonth(date.getMonth() + 1);

	if (window.location.hostname == 'www.10086.cn' || window.location.hostname == '10086.cn') {
		document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toUTCString() + "; domain=10086.cn; path=/";
	}
	else {
		document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toUTCString() + "; path=/";
	}

}
 
// Retrieve the value of the cookie with the specified name.
function getCookie(sName) {
	// cookies are separated by semicolons
	var aCookie = document.cookie.split("; ");
	var aCrumb = null;
	for (var i=0; i < aCookie.length; i++) {
    	// a name/value pair (a crumb) is separated by an equal sign
		aCrumb = aCookie[i].split("=");
		if (sName == aCrumb[0]) {
			return unescape(aCrumb[1]);
		}
	}
	// a cookie with the requested name does not exist
	return null;
}
 
// Delete the cookie with the specified name.
function delCookie(sName) {
	
	if (window.location.hostname == 'www.10086.cn' || window.location.hostname == '10086.cn') {
		document.cookie = sName + "=; expires=Fri, 31 Dec 1999 23:59:59 GMT; domain=10086.cn; path=/";
	}
	else {
		document.cookie = sName + "=; expires=Fri, 31 Dec 1999 23:59:59 GMT; path=/";
	}
	
	
}



//-->



